<%@ page pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib  uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html>
<head>
    <title>Welcome to me Web</title>
    <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/indexStyle.css" rel="stylesheet">
    <script src="/bootstrap/js/jquery-1.11.1.min.js"></script>
    <script src="/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
    <div class="myContainer">
        <div class="header">
            <div class="header_top" id="1F">
                <a href="/index.htm" class="header_icon">LEMONTREE</a>
                <div class="header_nav">
                    <ul>
                        <li class="active" onclick="javascript:document.getElementById('here').scrollIntoView()">
                            <a href="#services" name="inter-room">SERVICES</a>
                        </li>
                        <!--和blog的位置弄错了。。。。。-->
                        <li class="active">
                            <a href="#about" name="Blog">BLOG</a>
                        </li>
                        <li class="active">
                            <a href="#blog">ABOUT</a>
                        </li>
                        <li class="active" name="contact">
                            <a href="#contact">CONTACT</a>
                        </li>
                    </ul>
                </div>
                <%--普通用户权限--%>
                <shiro:hasAnyRoles name="001">
                    <shiro:hasPermission name="/index.htm">
                        <div><h1>index.htm有权限！</h1></div>
                    </shiro:hasPermission>
                    <shiro:hasPermission name="/register.htm">
                        <div><h1>register.htm有权限！</h1></div>
                    </shiro:hasPermission>
                </shiro:hasAnyRoles>
                <c:choose>
                    <c:when test="${user!=null}">
                        <div class="login_or_reg">
                            <div class="login_border">
                                <a >${user.userName}</a>
                            </div>
                            <div>
                                <a onclick="logout()">退出登录</a>
                            </div>
                        </div>
                    </c:when>
                    <c:otherwise>
                        <div class="login_or_reg">
                            <div class="login_border">
                                <a id="login">LOGIN</a>
                            </div>
                            <div>
                                <a id="register">REGISTER</a>
                            </div>
                        </div>
                    </c:otherwise>
                </c:choose>
            </div>
        </div>
        <div class="header_bottom">
        <div class="bottom_about_me">
                    <a href="#"><p>about Me</p></a>
                </div>
        </div>
        <div class="main-body" id="services">
            <div class="body-Container">
                <div class="row">
                    <h4>Services</h4>
                </div>
                <div class="row">
                    <div class="memory">
                        <div class="memory-box">
                            <img src="../../img/logobg.png">
                            <h2>备忘录</h2>
                            <p>描述：老是忘记有些事情? 赶紧记录下来！</p>
                            <a href="#"></a>
                        </div>
                    </div>
                    <div class="memory">
                        <div class="memory-box">
                            <img src="../../img/logobg.png">
                            <h2>BLOG</h2>
                            <p>描述：记录生活琐事,想你所想，写你所写</p>
                        </div>
                    </div>
                    <div class="memory">
                        <div class="memory-box">
                            <img src="../../img/logobg.png">
                            <h2>待定</h2>
                            <p>描述：即将通往异次元空间</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="about" id="about">
            <div class="row">
                <h4>BLOG</h4>
            </div>
            <div class="row">
                <div class="about-me">
                    <div class="radios">
                        <img src="../../img/title.jpg">
                    </div>
                    <div class="write-time">创建于: 2017-02-16 15:17</div>
                    <div class="write-desc">描述：略略颔首，微微皱眉</div>
                </div>
                <div class="about-me">
                    <div class="radios">
                        <img src="../../img/blog_title3.png">
                    </div>
                    <div class="write-time">创建于: 2017-02-16 15:17</div>
                    <div class="write-desc">描述：略略颔首，微微皱眉</div>
                </div>
                <div class="about-me">
                    <div class="radios">
                        <img src="../../img/blog_title.jpg">
                    </div>
                    <div class="write-time">创建于: 2017-02-16 15:17</div>
                    <div class="write-desc">描述：略略颔首，微微皱眉</div>
                </div>
                <div class="about-me">
                    <div class="radios">
                        <img src="../../img/blog_title2.jpg">
                    </div>
                    <div class="write-time">创建于: 2017-02-16 15:17</div>
                    <div class="write-desc">描述：略略颔首，微微皱眉</div>
                </div>
            </div>
        </div>
        <div class="blog" id="blog">
            <div class="row">
                <h4>个人简介</h4>
                <p>
                    2016年6月份毕业，计算机科学与技术专业，这个网站是利用空闲时间做的一个小网站，旨在作为自己的备忘录、博客等小功能用途

                </p>
            </div>
        </div>
        <div class="contact" id="contact">
            <div class="row">
                <h4>联系我</h4>
                <p>有什么意见或者建议，请联系我(后期加验证码)</p>
            </div>
            <div class="row">
                <div class="contact_form">
                    <div class="form-horizontal" role="form">
                        <div class="form-group">
                            <label for="realName" class="col-sm-2 control-label">真实姓名</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="realName" placeholder="真实姓名">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="email" class="col-sm-2 control-label">邮箱</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="email" placeholder="邮箱">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="phone" class="col-sm-2 control-label">手机号码</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="phone" placeholder="手机号码">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="suggestion" class="col-sm-2 control-label">建议：</label>
                            <div class="col-sm-10">
                                <textarea class="form-control" rows="4"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-default">提交</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="footer">
            <p>Copyright © 2017.lemontree All rights reserved.</p>
        </div>
    </div>
    <div class="bg-all">
    </div>
    <!-----------------------用户登录----------------------->
    <div class="login-black">
        <div class="modal-login">
            <div class="close-login">
                <img src="../../img/close.png">
            </div>
            <div class="modal-middle">
                <div class="form-horizontal" role="form">
                    <div class="form-group">
                        <label for="userName" class="col-sm-4 control-label">用户名</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" id="userName" placeholder="用户名">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="login_password" class="col-sm-4 control-label">密码</label>
                        <div class="col-sm-5">
                            <input type="password" class="form-control" id="login_password" placeholder="密码">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-4 col-lg-2">
                            <div class="checkbox">
                                <label>
                                    <input type="checkbox">记住
                                </label>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-4 col-lg-2">
                            <button type="submit" class="btn btn-primary" id="submit-btn" onclick="login()">登录</button>
                        </div>
                       <p><a id="reg-now">立即注册</a> / <a id="">找回密码</a></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--------------------用户注册--------------------->
    <div class="reg-bg-all">
        <div class="reg">
            <div class="close-login">
                <img src="../../img/close.png">
            </div>
            <div class="reg-header">
                <h4>
                    <del>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</del>
                    注册
                    <del>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</del>
                </h4>
            </div>
            <div class="reg-body">
                <div class="form-horizontal" role="form" id="reg_form">
                    <div class="form-group">
                        <label for="reg_UserName" class="col-sm-4 control-label">用户名:</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" id="reg_userName" placeholder="用户名">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="reg_realName" class="col-sm-4 control-label">真实姓名:</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" id="reg_realName" placeholder="真实姓名">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="gender" class="col-sm-4 control-label">性别:</label>
                        <label class="checkbox-inline">
                            <input type="radio" name="sex" id="boy" value="男" checked>男
                        </label>
                        <label class="checkbox-inline">
                            <input type="radio" name="sex" id="girl" value="女">女
                        </label>
                    </div>
                    <div class="form-group">
                        <label for="password" class="col-sm-4 control-label">密码:</label>
                        <div class="col-sm-5">
                            <input type="password" class="form-control" id="password" placeholder="密码">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="re_password" class="col-sm-4 control-label">密码确认:</label>
                        <div class="col-sm-5">
                            <input type="password" class="form-control" id="re_password" placeholder="密码确认">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="reg_phone" class="col-sm-4 control-label">手机号码:</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" id="reg_phone" placeholder="手机号码">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="reg_email" class="col-sm-4 control-label">邮箱:</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" id="reg_email" placeholder="邮箱">
                        </div>
                    </div>
                    <div class="form-group" style="display: none" id="reg_email_code_input">
                        <label for="reg_email_code" class="col-sm-4 control-label">邮箱注册码:</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" name="reg_email_code" id="reg_email_code" placeholder="邮箱注册码">
                        </div>
                    </div>
                    <div class="form-group" style="display: none" id="email_code_send_btn">
                        <label for="code_send_btn" class="col-sm-4 control-label"></label>
                        <div class="col-sm-5">
                             <button class="btn btn-primary" name="code_send_btn" id="code_send_btn" onclick="getEmailCode()">获取邮箱注册码</button>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-4 col-lg-2">
                            <button type="submit" class="btn btn-primary" id="submit-btn" onclick="regUser()">注册</button>
                        </div>
                        <p>已有账号，<a id="login-now">立马登录</a></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<script src="/js/common/jquery.md5.js"></script>
<script src="/layer.v3.0.3/layer.js"></script>
<script src="/js/index/Index.js"></script>
</html>
